package com.hrbxlh.dao;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

@Repository
public interface ProblemDao {
	
	/**
	 * @description 查询问题列表
	 * @return 
	 * @throws Exception
	 */
	 List<Map<String,Object>> getAllProblemList(Map<String, Object> paramMap) throws Exception;
	
	/**
	 * @description 查询问题详情
	 * @return 
	 * @throws Exception
	 */
	 Map<String,Object> getProblemDetail(Map<String, Object> paramMap) throws Exception;
	List<Map<String,Object>> getAllProblemListOther(Map<String, Object> paramMap) throws Exception;
	/**
	 * 提问问题。
	 * @throws IOException
	 */
	 boolean putProblem(Map<String,Object> paramMap) throws Exception;
	
	/**
	 * 向问题表中插入当前问题回答的个数。
			* @throws IOException
	 */
	 boolean saveProblem(Map<String,Object> paramMap) throws Exception;

	/**
	 * 删除我的问题
	 * @throws IOException
	 */
	 boolean delProblem(List<String> list) throws Exception;

	/**
	 * @description 我的问题
	 * @return
	 * @throws Exception
	 */
	 List<Map<String,Object>> getMyProblemList(Map<String, Object> paramMap) throws Exception;

	/**
	 * @description 判断当前人是否已经提过相同问题
	 * param stuorteaId problemName
	 * @return
	 * @throws Exception
	 */
	 Map<String,Object> getMyProblemByNameOrsId(Map<String, Object> paramMap) throws Exception;

	/**
	 * @description 查询每个习题中回答的个数
	 * @return
	 * @throws Exception
	 */
	 List<Map<String,Object>> getAnswerCountByProblemId(List<Map<String, Object>> list) throws Exception;

	/**
	 * @description 删除问题的方法，传的是每个人员的id
	 * @param List<Integer> 人员id的集合
	 * @return
	 * @throws Exception
	 */
	 boolean delProblemByUserId(List<String> paramList) throws Exception;

	/**
	 * @description 问题交流问题数
	 * @param 教师id
	 * @return
	 * @throws Exception
	 */
	 List<Map<String,Object>> getProblemCountByTeaId(Map<String, Object> paramMap) throws Exception;


	/**
	 * @description 回答问题数
	 * @param 教师id
	 * @return
	 * @throws Exception
	 */
	 List<Map<String,Object>> getAnswerCountByByTeaId(Map<String, Object> paramMap) throws Exception;


	/**
	 * 禁言
	 * @throws IOException
	 */
	 boolean excuseProblem(Map<String, Object> paramMap) throws Exception;

	/**
	 * @description 管理员查询问题列表
	 * @return
	 * @throws Exception
	 */
	 List<Map<String,Object>> getAdminAllProblemListByPost(Map<String, Object> paramMap) throws Exception;

}
